<%@ page import="java.util.Date" %>
<%@ page import="java.text.SimpleDateFormat" %><%--
  Created by IntelliJ IDEA.
  User: ghost
  Date: 2019/12/10
  Time: 14:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <style>
        a{
            text-decoration: none;
        }
        #left{
            padding:10px;
            margin: 10px;
            width:300px;
            height:700px;
            border:2px solid green;
        }
        #left li{
            list-style: none;
            padding-top:100px;
        }
        .float{
            float: left;
        }
        .clear:after{
            clear: both;
            content: "";
            height: 0;
            display: block;
        }
    </style>
</head>
<body>
<%@include file="checkLogin.jsp"%>
<%
    Date d = new Date(session.getLastAccessedTime());
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    String time =  sdf.format(d);
%>
<h1>欢迎登录：<%=session.getAttribute("username")%></h1>
<h4>上次登录时间：<%=time%></h4>
<p>欢迎你，<%=o%>&nbsp;<a onclick="return window.confirm('确认退出登录？');" href="loginout.jsp">注销</a></p>
<div id="left" class="float clear">
    <ul>
        <li><a href="studentinfo.jsp" target="MyIframe">学生</a></li>
        <li><a href="subjectinfo" target="MyIframe">课程</a></li>
    </ul>
</div>
<div id="right" class="float clear">
    <iframe name="MyIframe" frameborder="0" width="900px" height="900px"></iframe>
</div>
</body>
</html>
